﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>公告附件下载</title>
    <link href="../../WF/Scripts/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="../../WF/Scripts/bootstrap/js/jquery.min.js" type="text/javascript"></script>
    <script src="../../WF/Scripts/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../WF/Scripts/config.js"></script>
    <script src="../../WF/Comm/Gener.js" type="text/javascript"></script>
    <script src="../../WF/Scripts/QueryString.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {

            var handler = new HttpHandler("BP.OA.HttpHandler.App_Notice");
            handler.AddUrlData();
            var data = handler.DoMethodReturnString("DownFile");

            if (data.indexOf('err@') == 0) {
                alert(data); //如果是异常，就提提示.
                return;
            }

            if (data.indexOf('url@') == 0) {

                data = data.replace('url@', ''); //如果返回url，就直接转向.

                var i = data.indexOf('\DataUser');
                var str = '/' + data.substring(i);
                str = str.replace('\\\\', '\\');
                window.open(str, "_blank", "width=800, height=600,toolbar=yes");
                return;
            }
            //alert(data);
            return;
        });
    </script>
</head>
<body>
    <div id="div_file">
    </div>
</body>
</html>
